<?php
class ReflectionParameterInfo {
    /**
     * @var string
     */
    private $type;
    
    /**
     * @var string
     */
    private $description;
    
    /**
     * @var string
     */
    private $name;
    
    /**
     * @param ReflectionDocumentedClass $class
     * @param string $name
     * @param string $type
     * @param string $description
     * @param boolean $optional
     * @param mixed $default
     */
    public function __construct($name, $type, $description,
            $optional=false, $default=true) {
        $this->name = $name;
        $this->type = $type;
        $this->description = $description;
        $this->optional = $optional;
        $this->default = $default;
    }
    
    /**
     * @return string
     */
    public function getType() {
        return $this->type;
    }

    /**
     * @return string
     */
    public function getDescription() {
        return $this->description;
    }

    /**
     * @return string
     */
    public function getName() {
        return $this->name;
    }
    
    /**
     * Returns whether this parameter is optional.
     * 
     * @return boolean true if this parameter is optional
     */
    public function isOptional() {
        return $this->optional;
    }
    
    /**
     * Returns the default value. Meaningless if this parameter is not optional
     * @return string
     */
    public function getDefaultValue() {
        return $this->default;
    }
}
